/* 
 * File:   RemoteSource.h
 */

#ifndef REMOTESOURCE_H
#define	REMOTESOURCE_H

#include "vmime/vmime.hpp"
#include <vector>

#include "File.h"
#include "Account.h"
#include "File.h"



class RemoteSource {

public:

    void rConnect();
    void sConnect();

    bool sConnected();
    bool rConnected();

    std::vector<File>& getRemoteFiles();
    void setFileActions(std::vector<File>& files_);
    void preCleaning(std::vector<File>& files_);
    
    RemoteSource(RemoteAdress& receive_adress_, RemoteAdress& send_adress_);
   
private:

    
    vmime::ref<vmime::net::folder> folder;
    string sex; // string example for recognition our letters
    RemoteAdress& receive_adress;
    RemoteAdress& send_adress;


    void receiveFile(File& file_);
    void deleteFile(File& file_);
    void sendFile(File& file_);

    std::vector<File> files;

   

    vmime::ref<vmime::net::session> rsession;
    vmime::ref<vmime::net::session> ssession;
    vmime::ref<vmime::net::store> rstore;
    vmime::ref<vmime::net::transport> trans;

};

#endif	/* REMOTESOURCE_H */

